<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue08</title>
    <script src="./vue.min.js"></script>
</head>
<body>
    <div id="app">
        <!-- 调方法 -->
        <p>{{time()}}</p>
        <!-- 调属性 -->
        <p>{{time2}}</p>
    </div>
</body>
<script>
    var vm = new Vue({
        el:'#app',
        methods: {
            time:function (){
                return new Date().toLocaleString();
            }
        },
        computed:{//计算属性可以想象为缓存
            time2:function (){
                return new Date().toLocaleString();
            }
        }
    })
</script>
</html>